package com.example.demo.strategy;

import java.lang.reflect.InvocationTargetException;

public class CalculationMethodStrategyFactory {
    public static CalculationMethodStrategy getStrategy(String strategyName) throws ClassNotFoundException, IllegalAccessException, InstantiationException, NoSuchMethodException, InvocationTargetException {
        return (CalculationMethodStrategy) Class.forName(strategyName).newInstance();
    }
}
